package com.ruibang.glass.portal.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruibang.glass.common.utils.validateannotation.NotBlank;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@TableName("t_sys_menu")
public class MenuEntity implements Serializable {

    @TableId(value = "menu_id", type = IdType.ASSIGN_UUID)
    @ApiModelProperty(value = "菜单ID")
    private String menuId;

    @NotBlank(message = "菜单名称不能为空")
    @ApiModelProperty(value = "菜单名称")
    private String menuName;

    @ApiModelProperty(value = "父菜单id")
    private String parentId;

    @TableField(exist = false)
    private String parentName;

    @ApiModelProperty(value = "菜单url")
    private String url;

    @ApiModelProperty(value = "图标")
    private String icon;

    @ApiModelProperty(value = "菜单类型 1:菜单，2:按钮")
    private Integer type;

    @ApiModelProperty(value = "序号")
    private Integer orderNum;

    @ApiModelProperty(value = "状态 0:禁用,1:启用")
    private Integer status;

    //创建时间
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private Boolean enabled;
}
